import { Injectable } from '@nestjs/common';
import httpClient from '~/common/client/http.client';

@Injectable()
export class AppService {
  async getHello(): Promise<string> {
    return 'Hello World!';
  }

  async renderHome(): Promise<string> {
    let { result } = await httpClient.get<string, Error>(
      'http://106.55.191.71:3001/admin',
    );
    return result
  }

  async renderApp1(): Promise<string> {
    let { result } = await httpClient.get<string, Error>(
      'http://106.55.191.71:3001/admin/team1',
    );
    return result
  }

  async renderApp2(): Promise<string> {
    let { result } = await httpClient.get<string, Error>(
      'http://106.55.191.71:3001/admin/team2',
    );
    return result
  }
}
